DrawThemeFocusRect
NEW WITH THE APPEARANCE MANAGER
Draws or erases a focus ring around a specified rectangle consistent with the current theme.
pascal OSStatus DrawThemeFocusRect ( const Rect *inRect, Boolean inHasFocus);
inRect
- On input, a pointer to a rectangle.
inHasFocus
- A Boolean value. If
true
, the focus ring should be drawn. Iffalse
, the focus ring should be erased.- function result
- A result code; see "Result Codes".
DISCUSSION
TheDrawThemeFocusRect
function should be used to indicate that an item has keyboard focus. The focus ring is drawn outside the rectangle that is passed in and can be outset a maximum of 3 pixels.SPECIAL CONSIDERATIONS
To achieve the right look, you should first callDrawThemeEditTextFrame
orDrawThemeListBoxFrame
and then callDrawThemeFocusRect
, passing the same rectangle in theinRect
parameter. If you useDrawThemeFocusRect
to erase the focus ring around an editable text frame or list box frame, you will have to redraw the editable text frame or list box frame because there is typically an overlap.SEE ALSO
"Dialog Box Guidelines" in Mac OS 8 Human Interface Guidelines.